cmake_minimum_required(VERSION 3.12)

project(FOTF100_ROOT VERSION 1.0.0 LANGUAGES CXX)

# 指定二进制文件位置
 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})

 set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/libs)

 list(APPEND CMAKE_MESSAGE_INDENT "[ ROOT ] ==> ")


 set(PROJECT_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "打包类型")


if(MSVC) 
	# MSVC环境下告诉编译器使用UTF-8进行编译，用于关闭栈缓冲区安全检查
	add_compile_options(/GS- /source-charset:utf-8 /execution-charset:utf-8)
endif()

# 加载自定义的cmake宏和函数
file(GLOB MY_CMAKE_LIST ${PROJECT_SOURCE_DIR}/cmake/*.cmake)
foreach(MY_CMAKE_FILE IN LISTS MY_CMAKE_LIST)
	include(${MY_CMAKE_FILE})
endforeach()

# 加载第三方库
load_3rdparty(${DATABASE_TYPE})

# 添加 src 子目录
add_subdirectory(src)




